#include "Munition.h"
#include <stdio.h>


Munition::Munition(void)
{
	animated = false;
	crash = false;
	collisionID = -1;
	x = y = z = 0;
	xPos = yPos = zPos = 0;
	myX = xPos;
	myY = yPos;
	myZ = zPos;
}

void Munition::switchTexture(){}

bool Munition::isAnimated()
{
	return animated;
}

bool Munition::collision()
{
	bool tmp = crash;
	crash = false;
	return tmp;
}

int Munition::getCollisionID()
{
	return collisionID;	
}

int Munition::getDamage()
{
	return damage;
}

void Munition::setDamage(int i)
{
	damage += i;
}

void Munition::fire()
{
	animated = true;
}

GLfloat Munition::getX()
{
	return xPos;
}

GLfloat Munition::getY()
{
	return yPos;
}

GLfloat Munition::getZ()
{
	return zPos;
}

void Munition::setPosition(GLfloat xAxis, GLfloat yAxis, GLfloat zAxis)
{
	xPos = xAxis;
	yPos = yAxis;
	zPos = zAxis;
	if(!animated)
	{
		myX = xPos;
		myY = yPos;
		myZ = zPos;
	}
}

void Munition::setElevation(GLfloat e)
{
	elevation += e;
}

GLfloat Munition::getElevation()
{
	return elevation;
}

Munition::~Munition(void)
{
	map = 0;
}
